﻿// 1.1.6.11. Write a program that calculates for given N how many trailing zeros present at the end of the number N!.
//Examples: N = 10 -> N! = 3628800 -> 2

using System;

class LastZerosCounter
{
    static void Main()
    {
        int userInput = int.Parse(Console.ReadLine());  // int32 overflows pretty fast with factorial!
        byte counter = 0;

        for (int dividendFactorialCounter = userInput - 1, dividendCalculations = userInput; dividendFactorialCounter > 1; dividendFactorialCounter--)
        {
            dividendCalculations *= dividendFactorialCounter;
            if (dividendFactorialCounter == 2)
            {
                userInput = dividendCalculations;
            }
        }
        for (int i = 0; i < int.MaxValue; i++)
        {
            if (userInput % 10 == 0)
            {
                userInput /= 10;
                counter++;
            }
            else
            {
                break;
            }
        }
        Console.WriteLine(counter);
    }
}